<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnAssignTaskIsLimitDeliveryTimeInProjectTable extends AbstractMigration
{
    public function up()
    {
        $this->table('project')
            ->addColumn('assign_task_is_limit_delivery_time', 'enum', [
                'null' => false,
                'values' => 'yes,no',
                'default' => 'no',
                'comment' => '分配任务是否限制必须配置计划交付时间',
            ])
            ->save();
    }

    public function down()
    {
        $this->table('project')
            ->removeColumn('assign_task_is_limit_delivery_time')
            ->save();
    }
}
